<?php 
//I.F. Nuevo: 2011-02-28; ramarin
require_once('../../../config.php');
require_once($CFG->dirroot.'/'.$CFG->admin.'/report/moosisca/workflowlib.php');
require_once($CFG->dirroot.'/'.$CFG->admin.'/report/moosisca/managecourseslib.php');

global $USER;

$mooWf = optional_param('id', 0, PARAM_INT);
$inpopup = optional_param('inpopup', 1, PARAM_BOOL); 

if (!$inpopup) {
    print_header();
}

$observations = get_observations_course("mw.id, mwh.observations, mwh.userid, concat(u.firstname, ' ', u.lastname) realname, mwh.attachment, mwh.timecreated", "mw.id= '" . $mooWf . "' AND mwh.observations <> ''");
if($observations && !$observations->EOF) {  
  print_heading(get_string('observations', 'report_moosisca'));
  print_observations($observations);
}
else {
  print_heading(get_string('noObservationsFound', 'report_moosisca'));
}

?>